package com.aiwiown.face.request;

import com.aiwiown.face.ApiMethod;
import com.aiwiown.face.ApiObject;
import com.aiwiown.face.ApiRequest;
import com.aiwiown.face.internal.util.RequestParamUtils;
import com.aiwiown.face.response.LiteResultResponse;

import java.util.Map;

/**
 * <pre>
 * 此接口提供活体结果反查功能，可以以biz_id为索引对 FaceID Lite KYC验证结果进行反查。
 *
 * 注：该接口的数据存储有效期为一天，且仅第一次调用有效。
 *     第二次或超过有效期调用则会返回错误信息，建议在每笔业务结束之后及时的取回数据。
 * </pre>
 * LiteResultRequest
 * Date: 2020/4/24 0024
 * Time: 15:11
 *
 * @author tang.xiaosheng@qq.com
 */
public class LiteResultRequest implements ApiRequest<LiteResultResponse> {

    private static String apiUrl = "/lite/get_result";
    private String bizContent;
    private ApiObject bizModel = null;


    @Override
    public ApiMethod getApiMethod() {
        return ApiMethod.GET;
    }

    @Override
    public String getApiUrl() {
        return apiUrl;
    }

    @Override
    public Map<String, String> getTextParams() throws IllegalAccessException {
        return RequestParamUtils.getTextParams(this.bizModel);
    }

    @Override
    public Map<String, byte[]> getByteArrayParams() throws IllegalAccessException {
        return RequestParamUtils.getByteArrayParams(this.bizModel);
    }

    @Override
    public String getApiVersion() {
        return null;
    }

    @Override
    public Class<LiteResultResponse> getResponseClass() {
        return LiteResultResponse.class;
    }

    @Override
    public String getBizContent() {
        return this.bizContent;
    }

    public void setBizModel(ApiObject bizModel) {
        this.bizModel = bizModel;
    }

    @Override
    public String signVersion() {
        return null;
    }

    @Override
    public String getSignInfo(String apiKey, String secretKey) throws Exception {
        return null;
    }
}
